import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex)

//引入mutations
import { state, mutations, getters } from "./mutations"
//引入actions
import actions from "./actions"
// 导入子模块
import goodsList from "./modules/goodsList"
import details from "./modules/details"
import searchList from "./modules/searchList"
import cart from "./modules/cart"
import cate from "./modules/cate"
import order from "./modules/order"
import mine from "./modules/mine"
import banners from "./modules/banners"
import getCate from "./modules/getCate"
import seckill from "./modules/seckill"
// 实例化store仓库
export default new Vuex.Store({
    // 状态数据
    state,
    // 修改状态数据操作
    mutations,
    // 操作方法
    actions,
    // 派生出状态数据
    getters,
    modules: {
        goodsList,
        details,
        searchList,
        cart,
        cate,
        order,
        mine,
        banners,
        getCate,
        seckill
    }
})